<template>
    <div class="table-img" :style="{width, height: height || width}">
        <img :src="src" alt="">
    </div>
</template>
<script>
export default {
    name: 'tableImg',
    props: {
        src: {
            type: String,
            default () {
                return ''
            }
        },
        width: {
            type: String,
            default () {
                return '50px'
            }
        },
        height: {
            type: String,
            default () {
                return '50px'
            }
        }
    }
}
</script>
<style lang="scss" scoped>
.table-img {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    img {
        max-width: 100%;
        max-height: 100%;
    }
}
</style>